package vg.services.graph_view_manager.interfaces.tab;

import javax.swing.JComponent;

public abstract class ATab {
	public static final int DEF_UNKNOWN_TAB_TYPE = 0;
	public static final int DEF_GRAPH_VIEW_TAB_TYPE = 1;
	public static final int DEF_GRAPH_COMPARISON_TAB_TYPE = 2;
	public static final int DEF_GRAPH_TREE_COMPARISON_TAB_TYPE = 3;
	
	protected final int tabType;
	
	public ATab(int type) {
		if (type < 0 || type > 3)
			tabType = 0;
		else
			tabType = type;
	}
	
	/**
	 * Returns tab type.
	 * See DEF_UNKNOWN_TAB_TYPE, DEF_GRAPH_VIEW_TAB_TYPE, i.e.
	 */
	public int getTabType() {
		return tabType;
	}

	/**
	 * Returns tab title.
	 * Not <b>null</b>.
	 */
	public abstract String getTabTitle();
	
	/**
	 * Sets title for the tab.
	 * @param title - value can't be <b>null</b>.
	 */
	public abstract void setTabTitle(String title);
	
	public abstract JComponent getView();
}
